{{ if or .Params.toc (and .Site.Params.toc (ne .Params.toc false)) }}
<div class="post-toc" id="post-toc">
  <h2 class="post-toc-title">{{ i18n "toc" }}</h2>
  <div class="post-toc-content">
    {{.TableOfContents}}
  </div>
</div>
{{- end }}